home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / tde.zip / TDTXT1.DOC < prev   
Text File  |  1992-07-17  |  4KB  |  108 lines

  1. /***************************************************************************
  2.  
  3.  FILENAME - TDTXT1.DOC: Corrections/modifications to TDE.ZIP
  4.  -----------------------------------------------------------
  5.  
  6.  Class TDataEntry v1.0 - 07/14/92
  7.  --------------------------------
  8.  
  9.  ----------------------------------------------------------------------------
  10.  Author: Jeff Penrose * JDP Custom Software * (818) 344-7303 * CIS 71043,3727
  11.  ----------------------------------------------------------------------------
  12.  
  13.  A data entry class for Borland's Turbo Vision, derived from TInputLine.
  14.  
  15.  Copyright Notice
  16.  ================
  17.   As this material is ultimately derived from Borland source files, any of
  18.  their copyrights which MAY apply DO apply.
  19.   From the author's standpoint, you may use this material freely and,
  20.  hopefully, post any comments/corrections/enhancements to me at the above-
  21.  noted addresses.  I do ask that you not distribute this material except as
  22.  originally received, including all source/documentation files in their
  23.  original form.
  24.   If you DO modify or enhance any of this code, please send any such changes
  25.  to me for incorporation into a future version.  Any such enhancements will
  26.  be DONATED, without expectation of compensation or incorporation into
  27.  future versions.  Again, if you distribute this code, please do so in its
  28.  original, unmodified form including all source files and documentation.
  29.  
  30.  >> YOUR USE OF THIS SOFTWARE IS ENTIRELY AT YOUR OWN RISK. THE AUTHOR WILL
  31.  >> NOT BE HELD LIABLE IN ANY CASE FOR FAILURE OF THIS SOFTWARE TO PERFORM
  32.  >> AS DESCRIBED OR FOR ANY DAMAGES WHICH YOU MIGHT INCUR THROUGH YOUR USE OF
  33.  >> THIS SOFTWARE.  YOU AGREE WITH THESE TERMS IMPLICITLY THROUGH YOUR USE OF
  34.  >> THIS SOFTWARE.
  35.  
  36. ***************************************************************************/
  37.  
  38. 07/14/92/JDP
  39. ------------
  40.  
  41.   CORRECTIONS TO DOCUMENTATION for TDataEntry v1.0
  42.   ================================================
  43.  
  44.   The following are comments/corrections to documentation provided with
  45.   class TDataEntry in file TDE.ZIP.
  46.  
  47.   IMPORTANT NOTICE - ALL FILES
  48.   ----------------------------
  49.   Please note the addition of a disclaimer to the copyright notice above.
  50.   This applies to all files included with TDE.ZIP.
  51.  
  52.   file TDE.MAN
  53.   ------------
  54.   line 97:
  55.      Replace:
  56.       'The TDEDate object uses TDEData::defCentury...'
  57.      With:
  58.       'The TDEDate object uses TDEDate::defCentury...'
  59.  
  60.   line 158:
  61.      Replace:
  62.        '//** let TTarHistory grab this one'
  63.      With:
  64.        '//** let THistory grab this one'
  65.  
  66.   lines 174 - 178:
  67.     All references to 'TTarHistory' should be 'THistory'.
  68.     You don't need to declare an 'icon' member.  I copied the fragment from
  69.     an object (TTarHistory) I'd derived which overrode THistory::draw(); this
  70.     required an 'icon' member.  As presented, the code fragment does NOT
  71.     require a new 'icon' member.
  72.  
  73.   file TDE.DOC
  74.   ------------
  75.   line 437:
  76.     The description of TDEDate omits the data type: it's unsigned long and
  77.     is stored in YYYYMMDD format regardless of how TDEDate::defFormat is set.
  78.     This makes it easy to compare dates and use them for keys in a data file.
  79.  
  80.   TDEDate MODIFICATION
  81.   --------------------
  82.   TDEDate has a major duplication of code in its validData() function.  You
  83.   can eliminate this by doing the following:
  84.  
  85.   1) After line 175, insert a new line 176 which declares an unsigned long:
  86.      ADD THIS -->  ulong  date;  //* ulong is a typedef
  87.      The next step refers to line numbers which are correct AFTER this
  88.      addition is made.
  89.  
  90.   2) Replace the entire block which starts at line 186.  This block begins
  91.      with 'if ( dataOK && len )' and ends at line 221.  Replace this block
  92.      with the following code:
  93.  
  94.      if ( dataOK && len )
  95.      {                                    //* JDP 07/14/92 cut duplicate code
  96.        getData(&date);                    //*  by calling getData()
  97.        m = (int)((date % 10000) / 100 );
  98.        d = (int)(date % 100 );
  99.        y = (int)(date / 10000);
  100.        if ( m < 1 || m > 12  || d < 1 || y < 1800 ||
  101.             y > 3000 || d > DaysInMonth(m, y)
  102.           )
  103.          dataOK = False;
  104.      }
  105.  
  106.   /*********************** TDTXT1.DOC ends ******************************/
  107.  
  108.